# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=akregator
pkgver=20.04.3
pkgrel=0
arch="all !ppc64le !s390x !armhf !mips !mips64" # Limited by qt5-qtwebengine
url="https://kontact.kde.org/components/akregator.html"
pkgdesc="RSS Feed Reader"
license="GPL-2.0-or-later AND LGPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtwebengine-dev grantlee-dev kcrash-dev kdoctools-dev kcmutils-dev knotifyconfig-dev kparts-dev ktexteditor-dev kxmlgui-dev kiconthemes-dev knotifications-dev syndication-dev grantleetheme-dev kontactinterface-dev libkdepim-dev libkleo-dev messagelib-dev kpimtextedit-dev akonadi-mime-dev pimcommon-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/akregator-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="5d4d76becd5f6491a010ec27d24775b4163697b9c1ea780d382fee4a2351b937598b449f269e7652656bc0a14589726b68f3bf5e62d8cab62de6862d5182758c  akregator-20.04.3.tar.xz"
